<template>
  <div class="cards">
    <el-card class="box-card" v-for="(item,index) in list" :key="'card-'+index">
      <div class="card-title">{{item.title}}</div>
      <div class="card-content">
        <div class="card-num">{{item.count | toThousandFilter}}</div>
        <div class="card-desc">
          <span
            v-for="(col,col_index) in item.desc"
            :key="'col-'+col_index"
          >{{col.label}}：{{col.value| toThousandFilter}}</span>
        </div>
      </div>
    </el-card>
  </div>
</template>

<script>
export default {
  components: {},
  props: {
    list: {
      type: Array,
      default: () => []
    }
  },
  data() {
    return {};
  },
  mounted() {},
  methods: {}
};
</script>
<style scoped lang='scss'>
.cards {
  display: flex;
  flex-wrap: wrap;
  .box-card {
    width: 32%;
    box-sizing: border-box;
    margin-right: 2%;
    margin-bottom: 2%;
    &:nth-child(3n) {
      margin-right: 0;
    }
    .card-title {
      font-weight: bold;
      font-size: 20px;
      margin-bottom: 10px;
    }
    .card-content {
      display: flex;
      align-items: center;

      .card-num {
        font-size: 20px;
        margin-right: 20px;
      }
      .card-desc {
        font-size: 14px;
        color: #666;
        span {
          margin-right: 10px;
        }
      }
    }
  }
}
</style>